/**
 * @project lauwsys
 */
package com.chimoz.lauwsys.business.services;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chimoz.lauwsys.business.BrandManager;
import com.chimoz.lauwsys.domain.Brand;
import com.chimoz.lauwsys.repository.BrandRepository;

/**
 * @author Christian Teguh
 * @created 4 Okt 2011 16.38.10
 */
@Service
@Transactional
public class SimpleBrandManager implements BrandManager {

	@Autowired
	private BrandRepository brandRepository;
	
	public Brand createBrand(Brand brand) {
		return brandRepository.saveBrand(brand);
	}

	public Brand editBrand(Brand brand) {
		return brandRepository.saveBrand(brand);
	}

	public void removeBrand(Brand brand) {
		brandRepository.removeBrand(brand);
	}

	public Brand getBrandById(Long id) {
		return brandRepository.getBrandById(id);
	}

	public List<Brand> listBrand(Map<String, String> criteria) {
		return brandRepository.listBrand(criteria);
	}
	
	

}
